#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;
const int N = 110;

int n, m;
char a[N], b[N];

bool check(){
    if(n > m){
        return false;
    }

    for(int i = 0; i < n; i ++){
        if(a[i] != b[i]){
            return false;
        }
    }
    return true;
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);

    scanf("%s%s", a, b);
    n = strlen(a), m = strlen(b);

    if(check()){
        printf("Yes\n");
    }else{
        printf("No\n");
    }

    return 0;
}